<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script src="../js/jquery-1.8.3.js"></script>
    <style>
        /*图片大小:538x405*/
        *{
            margin: 0;
            padding: 0;
        }
        ul,li{
            list-style: none;
        }
        #box{
            width: 1138px;
            height: 405px;
            overflow: hidden;
        }
        #box ul li{
            width: 100px;
            height: 405px;
            float: left;
        }
        #box ul li.active{
            width: 538px;
            height: 405px;
        }
        #box ul li img{
            display: inline-block;
        }
    </style>
    <script>
        $(function(){
            $(".imgbox").each(function(){
                $(this).mouseover(function(){
                    $(this).stop().animate({'width':'538px'}).siblings().stop().animate({'width':'100px'});
                });
            });
        });

        $(function(){
            var date = new Date('2016-09-20');
            var year = date.getFullYear();
            var month = date.getMonth()+1;
            alert(month);
            var day = date.getDate();
            var maxDay;
            if(month==1||month==3||month==5||month==7||month==8||month==10||month==12){
                maxDay = 31;
            }
            if(month==4||month==6||month==9||month==11){
                maxDay = 30;
            }
            //获取闰年
            var cond1=year%4==0;
            var cond2=year%100!=0;
            var cond3=year%400==0;
            if(month==2){
                var cond = cond1 &&cond2||cond3;
                if(cond){
                    maxDay = 29;
                }else{
                    maxDay = 28;
                }
            }
            var maxDate;
            if(month>9){
                maxDate = year+"-"+month+"-"+maxDay;
            }else{
                maxDate = year+"-0"+month+"-"+maxDay;
            }
            var timer = setTimeout(showTime(),5000);
            alert("333");
        });
        function showTime(){
            alert("time");
        }

    </script>
</head>
<body>
<div id="box">
<ul>
    <li class="active imgbox"><img src="../img/1.jpg" alt="图片"/></li>
    <li class="imgbox"><img src="../img/2.jpg" alt="图片"/></li>
    <li class="imgbox"><img src="../img/3.jpg" alt="图片"/></li>
    <li class="imgbox"><img src="../img/4.jpg" alt="图片"/></li>
    <li class="imgbox"><img src="../img/5.jpg" alt="图片"/></li>
    <li class="imgbox"><img src="../img/6.jpg" alt="图片"/></li>
    <li class="imgbox"><img src="../img/7.jpg" alt="图片"/></li>
</ul>
</div>
</body>
</html>